#!/usr/bin/env python

import asyncio
import websockets

async def hello():
    async with websockets.connect("ws://localhost:6390") as websocket:
        await websocket.send("Hello world!")
        async for i in websocket:
            print(i)

if __name__ == '__main__':
    asyncio.run(hello())